<div id="ddsmoothmenu1" class="ddsmoothmenu">
    <ul>
        <li><?php echo $this->Html->link($this->Html->tag('span', 'Trang chủ'), array(
                                                                                    'controller' => 'index',
                                                                                    'action' => 'index'),
                                                                                array('escape' => false));?>
        </li>
        <li><?php echo $this->Html->link($this->Html->tag('span', 'Phổ Thông Cơ Sở'), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'index'),
                                                                                array('escape' => false));?>
            <ul>
                <li><?php echo $this->Html->link($this->Html->tag('span', 'Toán Học'), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'view', 1),
                                                                                array('escape' => false));?>
                    <ul>
                        <?php for($i = 6; $i <= 12; $i++){?>
                        <li><?php echo $this->Html->link($this->Html->tag('span', 'Toán Học '.$i), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'view', 1, $i),
                                                                                array('escape' => false));?></li>
                        <?php }?>
                    </ul>                                                                
                </li>
                <li><?php echo $this->Html->link($this->Html->tag('span', 'Vật Lý'), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'view', 2),
                                                                                array('escape' => false));?>
                    <ul>
                        <?php for($i = 6; $i <= 12; $i++){?>
                        <li><?php echo $this->Html->link($this->Html->tag('span', 'Vật Lý '.$i), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'view', 2, $i),
                                                                                array('escape' => false));?></li>
                        <?php }?>
                    </ul>                                                                
                </li>
                <li><?php echo $this->Html->link($this->Html->tag('span', 'Hóa Học'), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'view', 3),
                                                                                array('escape' => false));?>
                    <ul>
                        <?php for($i = 8; $i <= 12; $i++){?>
                        <li><?php echo $this->Html->link($this->Html->tag('span', 'Hóa Học '.$i), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'view', 3, $i),
                                                                                array('escape' => false));?></li>
                        <?php }?>
                    </ul>                                                                
                </li>
                <li><?php echo $this->Html->link($this->Html->tag('span', 'Sinh Học'), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'view', 4),
                                                                                array('escape' => false));?>
                    <ul>
                        <?php for($i = 6; $i <= 12; $i++){?>
                        <li><?php echo $this->Html->link($this->Html->tag('span', 'Sinh Học '.$i), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'view', 4, $i),
                                                                                array('escape' => false));?></li>
                        <?php }?>
                    </ul>                                                                
                </li>
                <li><?php echo $this->Html->link($this->Html->tag('span', 'Ngữ Văn'), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'view', 5),
                                                                                array('escape' => false));?>
                    <ul>
                        <?php for($i = 6; $i <= 12; $i++){?>
                        <li><?php echo $this->Html->link($this->Html->tag('span', 'Ngữ Văn '.$i), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'view', 5, $i),
                                                                                array('escape' => false));?></li>
                        <?php }?>
                    </ul>                                                                
                </li>
                <li><?php echo $this->Html->link($this->Html->tag('span', 'Lịch Sử'), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'view', 6),
                                                                                array('escape' => false));?>
                    <ul>
                        <?php for($i = 6; $i <= 12; $i++){?>
                        <li><?php echo $this->Html->link($this->Html->tag('span', 'Lịch Sử '.$i), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'view', 6, $i),
                                                                                array('escape' => false));?></li>
                        <?php }?>
                    </ul>                                                                
                </li>
                <li><?php echo $this->Html->link($this->Html->tag('span', 'Địa Lý'), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'view', 7),
                                                                                array('escape' => false));?>
                    <ul>
                        <?php for($i = 6; $i <= 12; $i++){?>
                        <li><?php echo $this->Html->link($this->Html->tag('span', 'Địa Lý '.$i), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'view', 7, $i),
                                                                                array('escape' => false));?></li>
                        <?php }?>
                    </ul>                                                                
                </li>
                <li><?php echo $this->Html->link($this->Html->tag('span', 'Tiếng Anh'), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'view', 8),
                                                                                array('escape' => false));?>
                    <ul>
                        <?php for($i = 6; $i <= 12; $i++){?>
                        <li><?php echo $this->Html->link($this->Html->tag('span', 'Tiếng Anh '.$i), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'view', 8, $i),
                                                                                array('escape' => false));?></li>
                        <?php }?>
                    </ul>                                                                
                </li>
                <li><?php echo $this->Html->link($this->Html->tag('span', 'Tin Học'), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'view', 9),
                                                                                array('escape' => false));?>
                    <ul>
                        <?php for($i = 6; $i <= 12; $i++){?>
                        <li><?php echo $this->Html->link($this->Html->tag('span', 'Tin Học '.$i), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'view', 9, $i),
                                                                                array('escape' => false));?></li>
                        <?php }?>
                    </ul>                                                                
                </li>
                <li><?php echo $this->Html->link($this->Html->tag('span', 'Công Nghệ'), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'view', 10),
                                                                                array('escape' => false));?>
                    <ul>
                        <?php for($i = 6; $i <= 12; $i++){?>
                        <li><?php echo $this->Html->link($this->Html->tag('span', 'Công Nghệ '.$i), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'view', 10, $i),
                                                                                array('escape' => false));?></li>
                        <?php }?>
                    </ul>                                                                
                </li>
                <li><?php echo $this->Html->link($this->Html->tag('span', 'Khác'), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'view', 11),
                                                                                array('escape' => false));?>
                    <ul>
                        <?php for($i = 6; $i <= 12; $i++){?>
                        <li><?php echo $this->Html->link($this->Html->tag('span', 'Khác '.$i), array(
                                                                                    'controller' => 'subjects',
                                                                                    'action' => 'view', 11, $i),
                                                                                array('escape' => false));?></li>
                        <?php }?>
                    </ul>                                                                
                </li>
            </ul>
        </li>
        <li><?php echo $this->Html->link($this->Html->tag('span', 'Tạo đề'), array(
                                                                                    'controller' => 'tests',
                                                                                    'action' => 'add'),
                                                                                array('escape' => false));?>
        </li>
<?php
    if($logged_in) {
?>
        <li><?php echo $this->Html->link($this->Html->tag('span', 'Đề cá nhân'), array(
                                                                                    'controller' => 'tests',
                                                                                    'action' => 'viewall'),
                                                                                array('escape' => false));?>
        </li>
<?php
    }
?>      
        <li><?php echo $this->Html->link($this->Html->tag('span', 'Liên hệ - Góp ý'), array(
                                                                                    'controller' => 'comments',
                                                                                    'action' => 'add'),
                                                                                array('escape' => false));?>
        </li>
        <li><?php echo $this->Html->link($this->Html->tag('span', 'Tìm kiếm'), array(
                                                                                    'controller' => 'index',
                                                                                    'action' => 'search'),
                                                                                array('escape' => false));?>
        </li>
    </ul>
</div>
